package com.lionli.netty.demo.httpServer.servlets;


import com.lionli.netty.demo.httpServer.http.Request;
import com.lionli.netty.demo.httpServer.http.Response;
import com.lionli.netty.demo.httpServer.http.Servlet;

/**
 * servlet处理
 *
 * @author LionLi
 */
public class MyServlet extends Servlet {

    public void doGet(Request request, Response response) {
        try {
            // 获取 name 参数 并返回
            response.write(request.getParameter("name"));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void doPost(Request request, Response response) {
        doGet(request,response);
    }

}
